//
// Created by liushuai on 18-8-8.
//
#include <stack>
#include <iostream>
using namespace std;
class maze{
private:
    int row;
    int col;
    char *mdata;
public:
    maze(char *mdata,int r=3,int c=4);
    int get_row() const;
    int get_col() const;
    void gen_maze();
    ~maze();
    friend std::ostream & operator<<(std::ostream &os,const maze &m);
};
int maze::get_col() const {
    cout<<"col: "<<col;
    return col;
}
int maze::get_row() const {
    return row;
}
maze::maze(char *m,int r, int c) : row(r),col(c){
    mdata = m;
};
void maze::gen_maze(maze & m) {
    int m_row = m.get_row()+1;
    int m_col = m.get_col()+1;

}
maze::~maze() {
}
//maze::maze() {
//    row = 3;
//    col = 4;
//    char m[row][col] = {{'1','1','0','0'},{'0','0','0','e'},{'0','0','m','1'}};
//}
std::ostream &operator<<(std::ostream & os, const maze & m) {
    int row = m.get_row();
    int col = m.get_col();
    for(int i=0;i<row;i++)
        for(int j=0;j<col;j++)
        {
            cout<<m.mdata[row*col]<<" ";
        }
        cout<<"\n";
}
int main()
{
//    char a[][4] = {{'1','1','0','0'},{'0','0','0','e'},{'0','0','m','1'}};
    char m[] = {'1','1','0','0','0','0','0','e','0','0','m','1'};
    for(int i=0;i<3;i++)
    {
        for(int j=0;j<4;j++)
        {
            cout<<m[i*3+j]<<" ";
        }
        cout<<"\n";
    }
//    maze m1 = maze(m);
//    cout<<m1;
}
